package four;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import four.model.FactoryBean;

/**
 * 静态工厂创建对象
 */
public class FactoryConfigurationExample {
    public static void main(String[] args) throws JsonProcessingException {
        ObjectMapper mapper = new ObjectMapper();
        FactoryBean factoryBean = mapper.readValue("{\"name\":\"wpp\",\"age\":10}", FactoryBean.class);
        System.out.println(factoryBean);

    }
}
